#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
int main()
{
	int a = 0;
	int b = 1;
	int c = 0;
	scanf("%d", &a);
	for (c=1; c < a; c++)
	{
		b *= c;
	}
	printf("%d", b);
	return 0;
}